<?php
//get path of directory containing this script



$dir = '/home/amemoryt/public_html/pdf/processed/'; 
//open a handle to the directory
$handle = opendir($dir);
//intitialize our counter
$count = 0;
//loop through the directory
while (false !== ($file = readdir($handle))) {
//evaluate each entry, removing the . & .. entries
if (is_file($file) && $file !== '.' && $file !== '..') {
$count++;
} else {
	echo $file."<br />";
	$count++;
}
}
echo $count;
?>
